package work.mediway.mdm;

import com.alibaba.fastjson.parser.ParserConfig;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;

import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * 启动程序
 *
 * @author
 */
@EnableSwagger2WebMvc
@ComponentScan(basePackages = {"com.mediway", "com.xxl", "work.mediway"})
// 指定要扫描的Mapper类的包的路径
@MapperScan({"com.mediway.**.mapper", "com.xxl.**.dao", "com.mediway.**.dao", "work.mediway.mdm.**.mapper"})
@SpringBootApplication

@EnableAsync
public class MdmApplication {
    public static void main(String[] args) {
        ParserConfig.getGlobalInstance().addAccept("org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsent");
        ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
        SpringApplication.run(MdmApplication.class, args);
    }
}
